<template>
  <el-card shadow="hover" class="stats-card">
    <div class="card-content">
      <div class="card-icon" :style="{ backgroundColor: iconBgColor }">
        <i :class="iconClass"></i>
      </div>
      <div class="card-info">
        <div class="card-title">{{ title }}</div>
        <div class="card-value">{{ value }}</div>
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  props: {
    title: String,
    value: [String, Number],
    iconClass: String,
    iconBgColor: String
  }
}
</script>

<style scoped>
.stats-card {
  margin-bottom: 20px;
  border-radius: 8px;
}

.card-content {
  display: flex;
  align-items: center;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  font-size: 20px;
}

.card-info {
  flex: 1;
}

.card-title {
  font-size: 14px;
  color: #909399;
  margin-bottom: 5px;
}

.card-value {
  font-size: 24px;
  font-weight: bold;
  color: #303133;
}
</style>